home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 3 / Light ROM 3 - Disc 2.iso / 3dstudio / tools / gears / setrotky.k3d < prev   
Text File  |  1995-02-23  |  2KB  |  49 lines

  1. ;---------------------------------------------------------------------
  2. ;              SETROTKEY.K3D - December 23th 1994
  3. ;       Rotation key interpolator by Arnoud van Delden
  4. ;    Whizzart multimedia - avdelde@hvscg01.ns-nl.att.com
  5. ;                   For use in 3DStudio R4
  6. ;---------------------------------------------------------------------
  7. ;
  8. ; This script may be freely distributed, but may not be sold, 
  9. ; rented, or leased without prior written consent of the author.
  10. ; It may not be modified from it's original "PKZIP" archive form or 
  11. ; redistributed without the original sample GEARS.3DS file.
  12. ;
  13. ;---------------------------------------------------------------------
  14. ;
  15. ChooseNode "Select object to interpolate", NT_OBJECT + NT_DUMMY
  16. If RC < 1 Then Gfx_Continue "Script aborted!" : End
  17. Orig$ = NodeName$
  18. Start = 0
  19. DoEvery = 2 :' May be changed by the user...
  20. NumFrames   :' Set the var. Time
  21. DefRotate RotArray(Time)
  22. ;
  23. ; First calculate the keys...
  24. ;
  25. For Frame = Start To Time step DoEvery
  26.         InterpolateKey Orig$, Frame, RotArray(Frame)
  27.         RotArray(Frame).easeTo = 0
  28.         RotArray(Frame).easeFrom = 0
  29.         RotArray(Frame).cont = 25
  30.         RotArray(Frame).tens = 25
  31.         RotArray(Frame).bias = 25
  32. Next Frame
  33. ;
  34. ; Backward Recalculate Delta's...
  35. ;
  36. For Frame = Start+DoEvery To Time step DoEvery
  37.         q = Time-Frame+DoEvery
  38.         RotArray(q).angle = RotArray(q).angle-RotArray(q-DoEvery).angle
  39. Next Frame
  40. ;
  41. ; Now create the new keys...
  42. ;
  43. For Frame = Start To Time step DoEvery
  44.         CreateKey Orig$, RotArray(Frame)
  45. Next Frame
  46. ;
  47. End
  48.  
  49.